package mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Update;
import pojo.User;

import java.util.List;
//    查询全部User
public interface UserMapper {
    List<User> selectAll();
//    查询单个
    User selectOne(int id);
//    插入一个User
    void insertOne(User user);
//    删除一个用户
    @Delete("DELETE FROM t_user WHERE id = #{id}")
    void deleteOne(int id);
//    修改一个User
    @Update("update t_user set username=#{username},fullname=#{fullname},password=#{password},address=#{address} WHERE id = #{id}")
    void updateOne(User user);
}

